<template>
  <el-form
    ref="nodeForm"
    :model="nodeForm"
    :rules="nodeRule"
    label-width="120px"
  >
    <el-row>
      <el-col :span="18">
        <el-form-item
          label="节点名称"
          prop="name"
        >
          <el-input v-model="nodeForm.name"></el-input>
        </el-form-item>
      </el-col>
    </el-row>
  </el-form>
</template>
<script>
export default {
  name: 'NodeForm',
  data() {
    return {
      nodeForm: {
        name: '' // 节点名称
      },
      nodeRule: {
        name: [{ required: true, message: '请输入节点名称', trigger: 'change' }]
      }
    }
  },
  methods: {
    nodeFormInit(name) {
      this.nodeForm.name = name
    },
    validate() {
     if (this.nodeForm.name) {
       return true
     }
     return false
    }
  }
}
</script>
